import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Mainboke1402 {
	public static void main(String[] args) {
		Connection con=null;
		Statement statement=null;
		ResultSet rs=null;
	}
	public static void displayAll(){
		Connection con=null;
		Statement statement=null;
		ResultSet rs=null;
		int resultNum=0;
		String driverName= "com.mysql.jdbc.Driver";
		String url="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK";
		String userName = "root";
		String password = "kfc123456";
		try {
			con = DriverManager
					.getConnection(url,userName,password);
String strSql = "insert into student (stuno,name,age,birthdate) values ('2015002','Xiho',23,'1994-01-25');";
			
			statement = con.createStatement();
			resultNum = statement.executeUpdate(strSql);
			System.out.println(resultNum+"条记录已经插入");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
	} 
}
